package monitor;

import java.awt.*;

public class PebblesGraphics {
	protected Graphics g;
	
	protected Color pebblesColor = Color.red;
	protected Color edgeColor = Color.blue;
	protected Color charColor = Color.black;
	protected int pebblesSize = 80;
	protected int pebblesStroke = 20;
	protected int stroke = 3;
	protected int fontsize = 20;
	
	
	public PebblesGraphics(Graphics g) {
		this.g = g;
	}
	
	public void drawPebble(int x, int y, int id) {
		int R = pebblesSize / 2;
		int r = (pebblesSize - pebblesStroke) / 2;
		g.setColor(pebblesColor);
		g.fillOval(x-R, y-R, pebblesSize, pebblesSize);
		g.setColor(Color.white);
		g.fillOval(x-r, y-r, 2*r, 2*r);
		g.setColor(charColor);
		g.setFont(new Font(Font.SANS_SERIF, Font.BOLD, fontsize));
		g.drawString(String.valueOf(id), x-2*fontsize, y+2*fontsize);
	}
	
	public void setPebblesColor(Color pebblesColor) {
		this.pebblesColor = pebblesColor;
	}

	public void setEdgeColor(Color connectionColor) {
		this.edgeColor = connectionColor;
	}

	public void setPebblesSize(int pebblesSize) {
		this.pebblesSize = pebblesSize;
	}

	public void setPebblesStroke(int pebblesStroke) {
		this.pebblesStroke = pebblesStroke;
	}

	public void setStroke(int stroke) {
		this.stroke = stroke;
	}

	public void setFontsize(int fontsize) {
		this.fontsize = fontsize;
	}

}
